<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function add1(a,b,c){
            return a+b+c;
        }
        console.log(add1(1,2,3));
 
        console.log(add2(1)(2)(3));
        function addUrl1(protocol){
            return function(host){
                return function(port){
                    return `${protocol}://${host}:${port}`;
                }
            }
        }
        
        const proUrl2 = addUrl1("http");
        const proUrHostl2 = proUrl2("localhost");
        console.log(proUrHostl2("8989"))
    </script>
</body>
</html>